'''import math
for i in range(1, 1001):
    if (math.factorial(i) - i * (i + 1) // 2) % 100 == 0:
        print(i, end = ' ')'''
# 1 3 24 | 175 199 200 224 | 375 399 400 424 | 575 599 600 624 | 775 799 800 824 975 999 1000
n = 2024041331404202
base = 3
cycles = (n - 24) // 200
ans = base + 4 * cycles
print(ans)
